package com.dianqiu.common.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.dianqiu.base.bean.BaseTO;

/**
 * DqLeagueClubs entity. @author David Dai
 */
@Entity
@Table(name = "dq_league_clubs", catalog = "dq_dev")
public class DqLeagueClubsTO extends BaseTO implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private DqLeagueClubsIdTO id;
	private DqClubsTO dqClubs;
	private DqLeaguesTO dqLeagues;

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "lgId", column = @Column(name = "LG_ID", nullable = false)),
			@AttributeOverride(name = "clbId", column = @Column(name = "CLB_ID", nullable = false)),
			@AttributeOverride(name = "season", column = @Column(name = "SEASON", nullable = false, length = 5)) })
	public DqLeagueClubsIdTO getId() {
		return id;
	}

	public void setId(DqLeagueClubsIdTO id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLB_ID", nullable = false, insertable = false, updatable = false)
	public DqClubsTO getDqClubs() {
		return this.dqClubs;
	}

	public void setDqClubs(DqClubsTO dqClubs) {
		this.dqClubs = dqClubs;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LG_ID", nullable = false, insertable = false, updatable = false)
	public DqLeaguesTO getDqLeagues() {
		return this.dqLeagues;
	}

	public void setDqLeagues(DqLeaguesTO dqLeagues) {
		this.dqLeagues = dqLeagues;
	}

}